//
//  BaseController.h
//  StoneMason
//
//  Created by iOS1 on 16/12/5.
//  Copyright © 2016年 iOS1. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BaseViewController : UIViewController

//一键回到tableView顶部按钮
@property (nonatomic, strong) UIButton *topBtn;

//一键返回到首页按钮
@property (nonatomic, strong) UIButton *homeBtn;

@property (nonatomic, strong) NSTimer *timer;

/**
 *  用与回调
 */
@property (nonatomic, copy) void (^callBack)(id value);

@property (nonatomic, copy) void(^rightBarBtnItemBlock)(void);

typedef void (^isFinishedShowNavBarBlock)(BOOL bo);

/**
 *  参数 用于自定义
 */
@property (nonatomic, strong) NSMutableDictionary *params;

@property (nonatomic, strong) UIColor *navBackTinColor;
/**
 *  是否显示在屏幕上
 */
@property (nonatomic, assign) BOOL isVisible;

/**
 * 界面跳转
 *
 @param class <#class description#>
 */
-(void)pushViewController:(Class)class;

/**
 *  返回
 */
-(void)popSelf;
/**
 *  隐藏网络提示
 */
-(void)hideLoadingWindow;

/**
 *  显示网络提示
 */
-(void)showLoadingWindow:(NSString *)title;

/**
 *  显示错误信息
 *
 *  @param titleStr 标题
 *  @param content  内容
 */
-(void)showSimpleViewWithHead:(NSString *)titleStr message:(NSString *)content;

/**
 *  判断是否登录 如果未登录跳转到登录页面
 *
 *  @return 是否登录
 */
-(BOOL)didLoginAction;

/**
 *  push到对应className的ViewController对象
 *
 *  @param className vc类名
 *  @param animated  是否动画
 *  @param params    参数 以字典方式
 *
 *  @return 要push的类的对象
 */
-(id)pushViewController:(NSString *)className animated:(BOOL)animated params:(NSDictionary *)params;


/**
 * 延迟返回
 *
 * @param vc 当前控制器
 */
-(void)delayPopViewController:(UIViewController *)vc;

/**
 * 无数据提示
 */
-(void)showNoDataMsg:(UIView *)v title:(NSString *)title;

-(void)showNoDataMsg:(UIView *)v title:(NSString *)title whitY:(NSInteger)y;

-(void)showNODataMsg:(UIView *)view;

-(void)closeNoDataMsg;

/**
 * 判断是否是特殊字符

 @param string <#string description#>
 @return <#return value description#>
 */
- (BOOL)stringContainsEmoji:(NSString *)string;

/**
 * 导航栏右侧按钮

 @param curVc <#curVc description#>
 @param imgName <#imgName description#>
 @param title <#title description#>
 @param size
 */
-(void)initRightItem:(UIViewController *)curVc imgName:(NSString *)imgName title:(NSString *)title btnSize:(CGSize)size;

/**
 * 向上滑动一定距离，显示导航栏

 @param scrollView <#scrollView description#>
 */
-(void)scrollTopShowNavBar:(UIScrollView *)scrollView scorllBlock:(isFinishedShowNavBarBlock)scrollBlock;

/**
 * 设置tableView分割线间距

 @param cell <#cell description#>
 @param distance <#distance description#>
 */
-(void)setSeparetInsert:(UITableViewCell *)cell distance:(NSInteger)distance;

/**
 * 拨打客服电话

 @param tel <#tel description#>
 */
-(void)dialKeFu:(NSString *)tel;
@end
